.chat-box {
  display: flex;
  flex: 1;
  align-items: stretch;
  padding: 16px;
  overflow: hidden;
}

.chat-wrapper {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
}

.chat {
  display: flex;
  flex: 1;
  flex-direction: column;
  height: 100%;
  background-color: var(--background-secondary);
  border-radius: 8px;
}

.chat-msg-send {
  padding: 10px 20px 20px;
  font-size: 0;
  word-break: break-all;

  .reply-msg-wrapper {
    display: flex;
    column-gap: 12px;
    align-items: center;
    padding: 4px 12px;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--font-light);
    word-wrap: break-all;
    white-space: pre-wrap;
    background-color: var(--background-3);
    border-radius: 8px;
  }

  .reply-msg-content {
    display: -webkit-box;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .reply-msg-icon {
    margin-left: auto;
    cursor: pointer;
    border-radius: 4px;

    &:hover {
      background-color: var(--background-secondary);
    }
  }

  .msg-input-box {
    display: flex;
    align-items: center;
  }

  .chat-not-login-mask {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    user-select: none;
  }

  .login-link {
    margin-right: 4px;
    margin-left: 4px;
    color: var(--color-primary);
  }

  .msg-input-wrapper {
    position: relative;
    flex: 1;
    margin: 0;
    margin-right: 20px;
  }

  .msg-input {
    :deep(.el-textarea__inner) {
      box-sizing: border-box;
      width: 100%;
      padding: 10px;
      font-size: 14px;
      color: var(--font-main);
      resize: none;
      background-color: var(--background-3);
      border: none;
      border-radius: 16px;
      box-shadow: none;
      transition: 0.2s;

      &:focus {
        outline: 2px solid var(--hover-primary);
      }
    }
  }

  .emoji-button {
    margin-right: 10px;
  }

  .emoji-button,
  .send-button {
    width: 40px;
    height: 40px;
    padding: 0;
    padding-top: 4px;
    font-size: 24px;
    color: var(--font-main);
    cursor: pointer;
    background-color: var(--color-primary);
    border: 0;
    border-radius: 12px;
    box-shadow: 0 0 5px 0 var(--hover-primary);
    transition: 0.3s;

    &:hover {
      box-shadow: 0 0 10px 0 var(--hover-primary);
    }

    &:disabled {
      cursor: not-allowed;
      opacity: 0.3;
    }
  }
}

.emoji-list {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  word-wrap: break-word;
  list-style-type: none;
}

.emoji-item {
  width: 28px;
  height: 28px;
  padding-top: 3px;
  padding-left: 2px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;

  &:hover {
    background-color: var(--background-3);
  }
}

@media only screen and (min-width: 640px) {
  .chat-box {
    padding: 20px;
    padding-left: 0;
  }

  .chat-wrapper {
    margin-right: 20px;
  }
}
